package net.jlibrary.computer.action.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import net.jlibrary.common.CoreConstants;

import net.jlibrary.common.core.annotation.VoForPo;
import net.jlibrary.common.core.entity.BaseVo;
import net.jlibrary.computer.domain.ComputerType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@VoForPo(ComputerType.class)
public class ComputerTypeVo extends BaseVo {

    private Long id;

    private String name;
    @DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
    @JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
    private Date createdate;
    @DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
    @JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
    private Date lastdate;


    private String nameSearchKey;

    @Override
    public Serializable getPrimaryKey() {
        return id;
    }

    @Override
    public Serializable getText() {
        return name;
    }

    @Override
    public Date getCreatedate() {
        return createdate;
    }

    @Override
    public Date getLastdate() {
        return lastdate;
    }

    @Override
    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    @Override
    public void setLastdate(Date lastdate) {
        this.lastdate = lastdate;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameSearchKey() {
        return nameSearchKey;
    }

    public void setNameSearchKey(String nameSearchKey) {
        this.nameSearchKey = nameSearchKey;
    }
}
